{extend name="shop/b2c/base" /}
{block name="resources"}
<link rel="stylesheet" type="text/css" href="__TEMP__/{$style}/public/css/integralcenter/exchange.css">
<style type="text/css">
.act-list ul li.first{
	margin-left:15px;
	height:300px;
	width:228px;
}
.act-list ul li.first:nth-child(5n+1){
	margin-left:0;
}
</style>
{/block}
{block name="main"}
<div class="margin-w1210 clearfix">
	<div class="w">
		<div class="breadcrumb clearfix">
			<a href="SHOP_MAIN.html" class="index">首页</a>
			<span class="crumbs-arrow">&gt;</span>
			<a href="SHOP_MAIN/goods/integralcenter.html" class="last">积分商城</a>
		</div>
	</div>
	<div class="blank"></div>
	<div id="JS_slider" class="act-slider fl">
		<div class="stage">
			<table id="JS_slide_stage" cellpadding="0" spellcheck="0" border="0" style="margin-left: 0px;">
				<tbody id="googleaaa"></tbody>
			</table>
		</div>
		<div id="JS_slide_nav" class="nav"> 
			<a href="javascript:;" class="current"></a> 
			<a href="javascript:;" class=""></a> 
			<a href="javascript:;" class=""></a> 
			<a href="javascript:;" class=""></a> 
		</div>
	</div>
	<!-- 火爆兑换start -->
	<div class="spot-goods fr">
		<h4>火爆兑换</h4>
		<ul id="JS_spot_goods">
			{foreach name="hotGoods.data"  item="good" key="k"}
			<li {if condition="$k eq 0"}class="open"{/if}>
				<div class="show">
					<span class="index">{$k+1}</span>
					<a href="SHOP_MAIN/goods/goodsinfo.html?goodsid={$good.goods_id}" target="_blank" title="{$good.goods_name}">{$good.goods_name}</a>
					<span class="price red">积分：{$good.point_exchange}</span>
				</div>
				<div class="hide">
					<div class="title">
						<span class="index">{$k+1}</span>
						<a href="SHOP_MAIN/goods/goodsinfo.html?goodsid={$good.goods_id}" target="_blank" title="{$good.goods_name}">{$good.goods_name}</a>
					</div>
				<div class="detail">
					<a href="" target="_blank" title="{$good.goods_name}" class="img">
						<img src="__UPLOAD__/{$good.pic_cover_micro}" width="122" height="122" alt="{$good.goods_name}">
					</a>
				<div class="number">
					<p class="p1"><strong>积分：{$good.point_exchange}</strong></p>
					<p class="p2"><a href="SHOP_MAIN/goods/goodsinfo.html?goodsid={$good.goods_id}" target="_blank">立即兑换</a></p>
				</div>
      </div>
    </div>
  </li>
  	{/foreach}
  </ul>
    </div>
    <!-- 火爆兑换end -->
  <div class="blank"></div>
  <div class="act-banner"> 
   <table cellpadding="0" cellspacing="0">
<tbody id="googlebbb">
</tbody>

</table>  
  </div>
    <div class="blank"></div>
  <div class="w mt15">
  <form method="GET" class="sort" name="listform">
    <div id="filter">
      <div class="fore1" style="border:none;">
        <dl class="order">
          <dt>商品排序：</dt>
          <dd class="" ><a {if condition="$id eq 1"}style="color:red"{/if}href="SHOP_MAIN/goods/integralcenter.html?id=1&nav_id=20">按销售量</a><b></b></dd>
          <dd class="" ><a {if condition="$id eq 2"}style="color:red"{/if}href="SHOP_MAIN/goods/integralcenter.html?id=2&nav_id=20">按收藏量</a><b></b></dd>
          <dd class="" ><a {if condition="$id eq 3"}style="color:red"{/if}href="SHOP_MAIN/goods/integralcenter.html?id=3&nav_id=20">按评价量</a><b></b></dd>
          <dd class="" ><a {if condition="$id eq 4"}style="color:red"{/if}href="SHOP_MAIN/goods/integralcenter.html?id=4&nav_id=20">按分享量</a><b></b></dd>
        </dl>
       	<div class='pagin pagin-m'><span class='text'>{if condition="$page egt 1 && $page elt $page_count"}{$page}{else/}1{/if}/{$page_count}</span>
       	  {if condition="$page elt 1"}
       	  	<span class="prev-disabled">上一页<b></b></span>
       	  {else/}
			<a href="SHOP_MAIN/goods/integralcenter.html?page={$page-1}&id={$id}" class="prev" style="border:1px solid #CCC">上一页<b></b></a>
		  {/if}
		  {if condition="$page lt $page_count && $page egt 1"}
          	<a href="SHOP_MAIN/goods/integralcenter.html?page={$page+1}&id={$id}" class="prev" style="border:1px solid #CCC">下一页<b></b></a> 
          {else/}
          	<span class="prev-disabled">下一页<b></b></span>
          {/if}
          </div>
        <div class="total">
        	<span>共<strong>{$hotGoods.total_count}</strong>个商品</span>
        </div>
        <span class="clr"></span>
       </div>
    </div>
  </form>
</div>
<!-- 商品详情开始 -->
<div class="w mt15">
<div class="act-list">
    <form name="compareForm" method="post">
      <ul class="clearfix" id="allgoods">
  {foreach $allGoods.data as $goods}
	<li class="first">
		<div class="img">
			<a href="SHOP_MAIN/goods/goodsinfo.html?goodsid={$goods.goods_id}" target="_blank" title="{$goods.goods_name}">
				<img src="__UPLOAD__/{$goods.pic_cover_mid}" alt="{$goods.goods_name}">
			</a>
			<p class="absBg"></p> 
			<p class="absFg">
				<a href="SHOP_MAIN/goods/goodsinfo.html?{$goods.goods_name}" target="_blank" title="{$goods.goods_name}">{$goods.goods_name}</a>
			</p>
		</div>
		<div class="info">
			{if condition="$goods.promotion_price neq 0 AND $goods.point_exchange neq 0"}
			<div class="price" style="width:143px;color:red;">
				<strong class="main-color arial">¥{$goods.promotion_price}+</strong><strong class="main-color arial">{$goods.point_exchange}</strong><span class="main-color jifen">积分</span>
			</div>
			{else/}
				{if condition="$goods.promotion_price eq 0"}
				<div class="price" style="width:143px;color:red;">
					<strong class="main-color arial">{$goods.point_exchange}</strong><span class="main-color jifen">积分</span>
				</div>
				{else/}
				<div class="price" style="width:143px;color:red;">
					<strong class="main-color arial">¥{$goods.promotion_price}</strong>
				</div>
				{/if}
			{/if}
			<div class="discount">
				<span class="f16 yahei"><a href="SHOP_MAIN/goods/goodsinfo.html?goodsid={$goods.goods_id}" target="_blank">立即兑换</a></span>
			</div> 
		</div>
	</li>
{/foreach}
      </ul>
    </form>
   {include file='shop/b2c/controlCommonPage' /}
  </div>
</div>
<div class="blank5"></div>


<script type="text/javascript">

$(document).ready(function(){
	//广告图
	var ap_id=1076;
	var data=platformAdvLoad(ap_id);
	var str = "";
// 	alert(JSON.stringify(data));
	  str+="<tr>";
	for(i=0;i<data.length;i++){
		str += '<td> <table cellpadding="0" cellspacing="0"><tbody><tr><td><a href="'+data[i]['adv_url']+'" target="_blank"><img src="__UPLOAD__/'+data[i]['adv_image']+'" width="910" height="320" border="0"></a></td></tr></tbody></table> </td>';
	}
	str+="</tr>"
	$("#googleaaa").html(str); 
	//2号广告图
	var ap_id2 = 1102;
	var data2 = platformAdvLoad(ap_id2);
	var str2 = "";
	//alert(JSON.stringify(data2));
	str2 += '<tr><td><a href="'+data2[0]['adv_url']+'" target="_blank"><img src="__UPLOAD__/'+data2[0]['adv_image']+'" width="1210" height="60" border="0"></a></td></tr>"';
	$("#googlebbb").html(str2);
});
// 焦点图
$(function(){
    var slider = $('#JS_slider'),
    sliderWidth = 910,
    stage = $('#JS_slide_stage'),
    list = stage.find('img'),
    len = list.length,
    nav = $('#JS_slide_nav a'),
    pTimer,
    index = 0;
    function move(index) {
        var distance = 0 - index * sliderWidth;
        stage.stop(true, false).animate({'margin-left':distance+'px'}, 300);
        nav.removeClass('current').eq(index).addClass('current');
	
        // 图片加载
//         var img = list.eq(index)
// 		var src = new src; 
//         img.attr('src',  src );
		
    }
    function auto() {
        move(index);
        index++;
        if ( index == len  ) {
            index = 0
        }
    }
    pTimer = setInterval(function(){
        auto();
    }, 3000);
    slider.hover(function(){
        clearInterval(pTimer);
    }, function(){
        pTimer = setInterval(function(){
            auto();
        }, 5000);
    });
    nav.mouseenter(function(){
        index = nav.index(this);
        move(index);
    });
});
// 现货特价
$(function(){
    var item = $('#JS_spot_goods li');
    item.hover(function(){
        item.removeClass('open')
        $(this).addClass('open');
        var img = $(this).find('img'),
        src = img.attr('data-lazy');
        img.attr('src', src);
    });
});

//请求数据
</script>
	<div class="blank"></div>
</div>

{/block}
{block name="javascript"}
<script src="__TEMP__/{$style}/public/js/integralcenter/integralcenter.js"></script>
<script>
getMemberInfo();
</script>
{/block}